<script src="/i/codemirror/lib/codemirror.js"></script>
<link rel="stylesheet" href="/i/codemirror/lib/codemirror.css">
<script src="/i/codemirror/addon/edit/closetag.js"></script>
<script src="/i/codemirror/addon/fold/xml-fold.js"></script>
<script src="/i/codemirror/mode/xml/xml.js"></script>
<script src="/i/codemirror/mode/javascript/javascript.js"></script>
<script src="/i/codemirror/mode/css/css.js"></script>
<script src="/i/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<style type="text/css" id=style>
	.CodeMirror {border: 1px solid #E5E1DB; height: 450px;}
</style>
<div class="row">
	<ol class="breadcrumb">
		<li><a href="#">模板</a></li>
		<li class="active">模板编辑</li>
	</ol>
</div>
<div class="row">
	<form class="form-horizontal">
		<div class="form-group">
			<label for="inputType" class="col-sm-2 control-label">模板类型</label>
			<div class="col-sm-6">
				<select class="form-control" id="inputType">
					<option>1</option>
					<option>2</option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label for="inputName" class="col-sm-2 control-label">模板名称</label>
			<div class="col-sm-6">
				<input type="text" name="title" class="form-control" id="inputName" placeholder="模板名称">
			</div>
		</div>
		<div class="form-group">
			<label for="inputPath" class="col-sm-2 control-label">路径</label>
			<div class="col-sm-6">
				<input type="text" name="title" class="form-control" id="inputPath" placeholder="路径">
			</div>
		</div>
		<div class="form-group">
			<label for="code" class="col-sm-2 control-label">模板内容</label>
			<div class="col-sm-8">
				<textarea id="code" name="code"></textarea>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-8">
				<button type="submit" class="btn btn-default">提交</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
    var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
        mode: 'text/html',
        autoCloseTags: true,
        lineNumbers: true,
        lineWrapping: true
    });
</script>
